Get Value of Photoelectric Sensor

  • Function:

    magicbox.get_photoelectric_switch_value(port)
    
  • Description: get detection status of photoelectric sensor

  • Required parameter:

    • port: controller port, range: 1~6
  • Return:
    • status: detection status of photoelectric sensor. 0: no shield;1:with shield
  • Example

    res = magicbox.get_photoelectric_switch_value(port=1)
    print(res)
    

    Get the detection status of photoelectric sensor connected to Port 1 of controller.

results matching ""

    No results matching ""